<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<!-- Set render engine for 360 browser -->
	<meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- HTML5 shim for IE8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <![endif]-->

	<link href="/public/simpleboot/themes/<?php echo C('SP_ADMIN_STYLE');?>/theme.min.css" rel="stylesheet">
    <link href="/public/simpleboot/css/simplebootadmin.css" rel="stylesheet">
    <link href="/public/js/artDialog/skins/default.css" rel="stylesheet" />
    <link href="/public/simpleboot/font-awesome/4.4.0/css/font-awesome.min.css"  rel="stylesheet" type="text/css">
    <style>
		.length_3{width: 180px;}
		form .input-order{margin-bottom: 0px;padding:3px;width:40px;}
		.table-actions{margin-top: 5px; margin-bottom: 5px;padding:0px;}
		.table-list{margin-bottom: 0px;}
	</style>
	<!--[if IE 7]>
	<link rel="stylesheet" href="/public/simpleboot/font-awesome/4.4.0/css/font-awesome-ie7.min.css">
	<![endif]-->
<script type="text/javascript">
//全局变量
var GV = {
    DIMAUB: "/",
    JS_ROOT: "public/js/",
    TOKEN: ""
};
document.domain = "xinhuiwen.com";
</script>
<!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="/public/js/jquery.js"></script>
    <script src="/public/js/wind.js"></script>
    <script src="/public/js/publish.js"></script>

    <script src="/public/simpleboot/bootstrap/js/bootstrap.min.js"></script>
<?php if(APP_DEBUG): ?><style>
		#think_page_trace_open{
			z-index:9999;
		}
	</style><?php endif; ?>
</head>
<style>
    .input_edit{
        width:120px;}
</style>
<body>
<div class="wrap js-check-wrap">
    <div class="wrap js-check-wrap">

        <form class="form-horizontal js-ajax-form" action="<?php echo U('NewsSet/defaultIndex');?>" method="post">
            <table class="table table-hover table-bordered table-list">
                <?php if($status == 1): ?><thead>
                    <tr>
                        <th width="80">序号</th>
                        <th width="220">业务名称</th>
                        <th width="260">管理员</th>
                    </tr>
                    </thead>
                <!--显示全部栏目列表 可操作-->
                <?php if(is_array($data)): foreach($data as $key=>$vo): ?><p style="display: none;" id="dis_menu_id"><?php echo ($vo["menu_id"]); ?></p>
                    <tr>
                        <td>
                            <?php echo ($key+1); ?>
                        </td>
                        <td>
                            <?php echo ($vo["name"]); ?>
                        </td>
                        <td>
                            <?php echo ($vo["usernames"]); ?>
                            <a style="float:right;"  class="btn btn-primary"  onclick="edit_admin('<?php echo ($vo["menu_id"]); ?>','<?php echo ($vo["admin_ids"]); ?>','<?php echo ($vo["usernames"]); ?>')">修改</a>

                        </td>
                    </tr><?php endforeach; endif; ?>
                <?php else: ?>
                <!-- 显示有权限的 可操作栏目 -->
                <?php if(is_array($data)): foreach($data as $key=>$vo): if($vo['model'] == "Movement"){ $the_model = $vo['model'].'/'.lists; }else if($vo['model'] == "Live"){ $the_model = $vo['model'].'/'.index; }else if($vo['model'] == "CompanyManagement"){ $the_model = 'PeopleManagement/index'; }else if($vo['model'] == "Indexadmin"){ $the_model = User.'/'.lists; } ?>
                    <tr>
                        <td>
                            <a href="<?php echo U($the_model,array('menu_id'=>$vo['menu_id']));?>"><?php echo ($vo["name"]); ?></a>
                        </td>
                    </tr><?php endforeach; endif; endif; ?>
            </table>
        </form>
        <div class="pagination"><?php echo ($page); ?></div>
    </div>

</div>
<script src="/public/js/common.js"></script>
<script src="/public/js/layer/layer.js"></script>
<script>
    function edit_admin(menu_id,admin_ids,usernames){
        layer.open({
            type: 2,
            //skin: 'layui-layer-lan',
            title: '修改管理员',
            fix: false,
            shadeClose: true,
            maxmin: true,
            area: ['650px', '500px'],
            content: "<?php echo U('Admin/Other/editAdmin')?>"+'&menu_id='+menu_id+'&admin_ids='+admin_ids+'&usernames='+usernames,
            end: function(){
                location.reload();
            }
        });
    }

</script>

</body>
</html>